package com.xu.provider.controller;

import com.xu.common.vo.R;
import com.xu.provider.service.WeatherProviderSaervice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

/**
 * @author 徐老板
 * @date 2020/4/1   20:54
 */
@RestController
public class WeatherProviderController {
    @Autowired
    private WeatherProviderSaervice service;

    //查询今日天气
    @GetMapping("/provider/weather/querytoday.do")
    public R queryToday(@RequestParam String city){
        return service.queryToday(city);
    }
    @GetMapping("/provider/weather/querycity.do")
    public R queryCityAll(@RequestParam String city){
        return service.queryAll(city);
    }
    @GetMapping("/provider/weather/all.do")
    public R all(){
        return service.queryAll();
    }
}
